package com.zh.rocketMq;

import com.zh.sys.service.EmployeeService;
import com.zhang.entity.Examine;
import com.zhang.entity.Feedback;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author: 96199
 * @className: EmailConsumer2
 * @description:
 * @date: 2021/6/28 16:12
 * @version: 0.1
 * @since: jdk1.8
 */
@Component
@RocketMQMessageListener(consumerGroup = "FeedbackConsumer",topic = "FeedbackTest")
public class EmailConsumer2  implements RocketMQListener<Feedback> {
    @Resource
    private EmployeeService employeeService;

    @Override
    public void onMessage(Feedback feedback) {
        employeeService.sendEmailFb(feedback);
    }
}
